package com.lmz.project.redis.arithmetic.threadLearn.createthread;

public class RunnableImpl implements Runnable{

    public static void main(String[] args) {
        RunnableImpl runnable = new RunnableImpl();
        Thread thread = new Thread(runnable);
        thread.setName("runnable接口线程");
        thread.start();
    }


    @Override
    public void run() {
        //获取当前线程对象
        Thread thread = Thread.currentThread();
        System.out.println(thread.getName() + "正在运行");
    }
}
